Optimal. Leaf size=46 \[ -\tan ^{-1}\left (\frac {e x}{\sqrt {d^2-e^2 x^2}}\right )-\tanh ^{-1}\left (\frac {\sqrt {d^2-e^2 x^2}}{d}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 46, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 7, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.259, Rules used = {864, 858, 223,
209, 272, 65, 214} \begin {gather*} -\text {ArcTan}\left (\frac {e x}{\sqrt {d^2-e^2 x^2}}\right )-\tanh ^{-1}\left (\frac {\sqrt {d^2-e^2 x^2}}{d}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 209
Rule 214
Rule 223
Rule 272
Rule 858
Rule 864
Rubi steps
\begin {align*} \int \frac {\sqrt {d^2-e^2 x^2}}{x (d+e x)} \, dx &=\int \frac {d-e x}{x \sqrt {d^2-e^2 x^2}} \, dx\\ &=d \int \frac {1}{x \sqrt {d^2-e^2 x^2}} \, dx-e \int \frac {1}{\sqrt {d^2-e^2 x^2}} \, dx\\ &=\frac {1}{2} d \text {Subst}\left (\int \frac {1}{x \sqrt {d^2-e^2 x}} \, dx,x,x^2\right )-e \text {Subst}\left (\int \frac {1}{1+e^2 x^2} \, dx,x,\frac {x}{\sqrt {d^2-e^2 x^2}}\right )\\ &=-\tan ^{-1}\left (\frac {e x}{\sqrt {d^2-e^2 x^2}}\right )-\frac {d \text {Subst}\left (\int \frac {1}{\frac {d^2}{e^2}-\frac {x^2}{e^2}} \, dx,x,\sqrt {d^2-e^2 x^2}\right )}{e^2}\\ &=-\tan ^{-1}\left (\frac {e x}{\sqrt {d^2-e^2 x^2}}\right )-\tanh ^{-1}\left (\frac {\sqrt {d^2-e^2 x^2}}{d}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.12, size = 81, normalized size = 1.76 \begin {gather*} 2 \tanh ^{-1}\left (\frac {\sqrt {-e^2} x}{d}-\frac {\sqrt {d^2-e^2 x^2}}{d}\right )+\frac {e \log \left (-\sqrt {-e^2} x+\sqrt {d^2-e^2 x^2}\right )}{\sqrt {-e^2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(140\) vs.
\(2(42)=84\).
time = 0.07, size = 141, normalized size = 3.07
method | result | size |
default | \(-\frac {\sqrt {-\left (x +\frac {d}{e}\right )^{2} e^{2}+2 d e \left (x +\frac {d}{e}\right )}+\frac {d e \arctan \left (\frac {\sqrt {e^{2}}\, x}{\sqrt {-\left (x +\frac {d}{e}\right )^{2} e^{2}+2 d e \left (x +\frac {d}{e}\right )}}\right )}{\sqrt {e^{2}}}}{d}+\frac {\sqrt {-e^{2} x^{2}+d^{2}}-\frac {d^{2} \ln \left (\frac {2 d^{2}+2 \sqrt {d^{2}}\, \sqrt {-e^{2} x^{2}+d^{2}}}{x}\right )}{\sqrt {d^{2}}}}{d}\) | \(141\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.48, size = 55, normalized size = 1.20 \begin {gather*} -\frac {{\left (d \arcsin \left (\frac {x e}{d}\right ) e^{\left (-1\right )} + d e^{\left (-1\right )} \log \left (\frac {2 \, d^{2}}{{\left | x \right |}} + \frac {2 \, \sqrt {-x^{2} e^{2} + d^{2}} d}{{\left | x \right |}}\right )\right )} e}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.14, size = 51, normalized size = 1.11 \begin {gather*} 2 \, \arctan \left (-\frac {{\left (d - \sqrt {-x^{2} e^{2} + d^{2}}\right )} e^{\left (-1\right )}}{x}\right ) + \log \left (-\frac {d - \sqrt {-x^{2} e^{2} + d^{2}}}{x}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {- \left (- d + e x\right ) \left (d + e x\right )}}{x \left (d + e x\right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.78, size = 48, normalized size = 1.04 \begin {gather*} -\arcsin \left (\frac {x e}{d}\right ) \mathrm {sgn}\left (d\right ) - \log \left (\frac {{\left | -2 \, d e - 2 \, \sqrt {-x^{2} e^{2} + d^{2}} e \right |} e^{\left (-2\right )}}{2 \, {\left | x \right |}}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {\sqrt {d^2-e^2\,x^2}}{x\,\left (d+e\,x\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________